import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
import chapter01 from './chapter01';
import chapter02 from './chapter02';
import chapter03 from './chapter03';

const routes: RouteRecordRaw[] = [
    ...chapter01,
    ...chapter02,
    ...chapter03
]

const router = createRouter({
    history:createWebHistory(),
    routes
});

router.beforeEach((to) => {
    document.title = 'threejs-vite-vue3.2 '+to.meta.title as string
})

export default router;